package com.example.demo.common;


/**
 * \* Created with IntelliJ IDEA.
 * \* User: deep
 * \* Date: 17-9-15
 * \* Time: 下午12:49
 * \* To change this template use File | Settings | File Templates.
 * \* Description:
 * \
 */
public enum BaseErrorConfigEnum implements IEnum {

    APP_REQUEST_HEADER_DEVICE_CHANNEL_PARAMTER_REQUIRED("1000000","请求头参数设备渠道号不可为空","APP"),



    SUCCESS("SUCCESS","未找到用户","COMMON"),
    TIMESTAMP_FORMAT_FAIL("TIMESTAMP_FORMAT_FAIL","时间格式错误","COMMON"),
    OUTPUT_EXCEL_FAIL("OUTPUT_EXCEL_FAIL","输出excel错误","COMMON"),
    CONVERTER_FAIL("CONVERTER_FAIL","转换错误","COMMON"),
    DOUBLE_VALID_ERROR("DOUBLE_VALID_ERROR","输入数据不为数字错误","COMMON"),
    DOUBLE_VALID_GT_ZERO_ERROR("DOUBLE_VALID_GT_ZERO_ERROR","输入数据需要是数字且大于０","COMMON"),
    FAIL("FAIL","错误","COMMON"),
    TIMESTAMP_DATE_FORMAT_FAIL("TIMESTAMP_DATE_FORMAT_FAIL","日期时间戳格式错误,检测到时分秒不为0","COMMON"),
    REQUEST_RESTRICTED("1000001", "受限制的请求", "COMMON"),
    DISTRIBUTED_LOCKKEY_ERROR("1000002", "获取锁的键值异常", "COMMON"),
    METHOD_PROCEED_ERROR("1000003", "方法执行异常", "COMMON"),
    FEGIN_REQUEST_RESULTOBJECT_IS_NULL("FEGIN_REQUEST_RESULTOBJECT_IS_NULL","请求其他微服务接口未返回标准数据对象","COMMON"),
    TCC_ERROR("1000004", "TCC操作异常", "COMMON"),
    TCC_ENTRY_ID_ERROR("1000005", "数据被其他操作占用", "COMMON"),
    TCC_SAVE_ERROR("1000006", "TCC操作保存异常", "COMMON"),
    TCC_DELETE_ERROR("1000007", "TCC操作删除异常", "COMMON"),
    TCC_ENTRY_ID_NOT_NULL("1000008", "TCC_ENTRY_ID不能为空", "COMMON"),





    //下单数据校验
    APPLY_IS_NOT_NULL("1000008", "未找到该下单记录，不能编辑", "APPLY"),
    APPLY_SOURCE_IS_NOT_NULL("1000008", "下单来源不能为空", "APPLY"),
    SITE_IS_NOT_NULL("1000008", "站点不能为空", "APPLY"),
    APPLY_DATE_IS_NOT_NULL("1000008", "下单日期不能为空", "APPLY"),
    EXPECT_COMMENT_DATE_IS_NOT_NULL("1000008", "期望上评日期不能为空", "APPLY"),
    PRODUCT_BELONG_USER_IS_NOT_NULL("1000008", "产品负责人不能为空", "APPLY"),
    CUSTOMER_NAME_IS_NOT_NULL("1000008", "客户不能为空", "APPLY"),
    BUSINESS_TYPE_IS_NOT_NULL("1000008", "业务类型不能为空", "APPLY"),
    FBA_IS_NOT_NULL("1000008", "物流不能为空", "APPLY"),
    SHOP_NAME_IS_NOT_NULL("1000008", "店铺不能为空", "APPLY"),
    PRODUCT_NAME_IS_NOT_NULL("1000008", "产品名称不能为空", "APPLY"),
    ASSIN_IS_NOT_NULL("1000008", "ASSIN不能为空", "APPLY"),
    PRICE_IS_NOT_NULL("1000008", "产品价格不能为空", "APPLY"),
    MULT_IS_NOT_NULL("1000008", "数量不能为空", "APPLY"),
    SEARCH_KEYWORD_IS_NOT_NULL("1000008", "关键词不能为空", "APPLY"),
    POSITION_IS_NOT_NULL("1000008", "位置不能为空", "APPLY"),
    PRODUCT_URL_IS_NOT_NULL("1000008", "产品URL不能为空", "APPLY"),

    //订单
    ORDER_IS_NOT_NULL("1000008", "未找到该订单记录，不能编辑", "APPLY"),
    ACCOUNT_SOURCE_IS_NOT_NULL("1000008", "账号来源不能为空", "ORDER"),
    ORDER_AMOUNT_IS_NOT_NULL("1000008", "订单金额不能为空", "ORDER"),
    OPTION_USER_IS_NOT_NULL("1000008", "处理人不能为空", "ORDER"),
    DUE_REVIEW_DATE_IS_NOT_NULL("1000008", "应上评日期不能为空", "ORDER"),
    APPLY_ID_NOT_NULL("1000008", "关联下单记录不能为空", "ORDER"),
    DUE_REFUND_COMMISSION_IS_NOT_NULL("1000008", "应收/付佣金不能为空", "ORDER"),
    EXCHANGE_RATE_NOT_NULL("1000008", "汇率不能为空", "ORDER"),
    EXCHANGE_RATE_NOT_CONFIG_NULL("1000008", "未配置汇率", "ORDER"),


    //vps
    VPS_NOT_NULL("1000008", "未找到该条VPS记录，不能编辑", "VPS"),
    VPS_IP_NOT_NULL("1000008", "IP不能为空", "VPS"),
    VPS_CHANNEL_URL_NOT_NULL("1000008", "VPS渠道网址不能为空", "VPS"),
    VPS_USER_NOT_NULL("1000008", "VPS渠道登录用户不能为空", "VPS"),
    VPS_CHANNEL_NOT_NULL("1000008", "VPS渠道不能为空", "VPS"),

    //card
    CARD_NOT_NULL("1000008", "未找到卡记录，不能编辑", "CARD"),
    CARD_NO_NOT_NULL("1000008", "卡号不能为空", "CARD"),
    CARD_TYPE_NOT_NULL("1000008", "卡类型不能为空", "CARD"),
    CARD_CHANNEL_NOT_NULL("1000008", "卡渠道不能为空", "CARD"),
    BALANCE_AMOUNT_NOT_NULL("1000008", "余额不能为空", "CARD"),
    CARD_END_DATE_IS_NOT_NULL("1000008", "卡到期时间不能为空", "CARD"),
    CARD_CVC_IS_NOT_NULL("1000008", "CVC不能为空", "CARD"),

    //virtual
    VIRTUAL_NOT_NULL("1000008", "未找到卡记录，不能编辑", "VIRTUAL"),
    SERVICE_NAME_IS_NOT_NULL("1000008", "服务器不能为空", "VIRTUAL"),
    SERVICE_USER_IS_NOT_NULL("1000008", "服务器登录用户不能为空", "VIRTUAL"),
    VIRTUAL_NAME_IS_NOT_NULL("1000008", "虚拟机名称不能为空", "VIRTUAL"),

    //email
    EMAIL_NOT_NULL("1000008", "未找到邮箱记录，不能编辑", "EMAIL"),
    EMAIL_DETAIL_IS_NOT_NULL("1000008", "邮箱不能为空", "EMAIL"),
    ASSET_EMAIL_IS_NOT_NULL("1000008", "辅助不能为空", "EMAIL"),
    PASSWORD_IS_NOT_NULL("1000008", "密码不能为空", "EMAIL"),

    //地址
    ADDRESS_NOT_NULL("1000008", "未找到地址记录，不能编辑", "ADDRESS"),
    ADDRESS_NAME_NOT_NULL("1000008", "收件人不能为空", "ADDRESS"),
    COUNTRY_IS_NOT_NULL("1000008", "国家不能为空", "ADDRESS"),
    CITY_IS_NOT_NULL("1000008", "城市不能为空", "ADDRESS"),
    ADDRESS_DETAIL_IS_NOT_NULL("1000008", "详细地址不能为空", "ADDRESS"),
    TAX_CITY_IS_NOT_NULL("1000008", "是否收取消费税不能为空", "ADDRESS"),
    PHONE_IS_NOT_NULL("1000008", "联系电话不能为空", "ADDRESS"),


    //账号
    ACCOUNT_NOT_NULL("1000008", "未找到账号记录，不能编辑", "ADDRESS"),
    ORDER_ACCOUNT_NOT_NULL("1000008", "订单请关联账号", "ADDRESS"),
    ACCOUNT_USE_TYPE_IS_NOT_NULL("1000008", "账号使用类型不能为空", "ADDRESS"),
    ACCOUNT_CHANGE_USER_IS_NOT_NULL("1000008", "账号负责人不能为空", "ADDRESS"),
    ACCOUNT_VPS_IS_NOT_NULL("1000008", "账号关联的VPS不能为空", "ADDRESS"),
    ACCOUNT_VIRTUAL_IS_NOT_NULL("1000008", "账号关联虚拟机不能为空", "ADDRESS"),
    ACCOUNT_STAR_IS_NOT_NULL("1000008", "账号星级不能为空", "ADDRESS"),
    ORDER_PROVIDER_NOT_NULL("1000008", "订单关联第三方出单公司", "ADDRESS"),
    ;


    private String code;

    private String value;

    private String group;
    @Override
    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }
    @Override
    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }
    @Override
    public String getGroup() {
        return group;
    }

    @Override
    public String getCode(String value, String group) {
        return null;
    }

    @Override
    public String getValue(String code, String group) {
        return null;
    }

    public void setGroup(String group) {
        this.group = group;
    }

    BaseErrorConfigEnum(String code, String value, String group) {
        this.code = code;
        this.value = value;
        this.group = group;
    }
}